The disclosures herein relate generally to factory-installation of software and, more particularly, to a method of factory-installing files and directories with long filenames while maintaining proper references to the short filename equivalents thereof.
For legacy support with operating systems and applications that do not support long filenames for directories and files, Windows 95 assigns 8.3 equivalent xe2x80x9cshortxe2x80x9d filenames that are unique within a given path to each long filename on the system. This applies to both files and directories that have long filenames. For example, the short filename of xe2x80x9cMicrosoft Internet Explorerxe2x80x9d would be xe2x80x9cMICROSxcx9c1xe2x80x9d if it was the first xe2x80x9cMicrosoft_xe2x80x9d file or directory created under a given path. The short filename of the next xe2x80x9cMicrosoft_xe2x80x9d file or directory created under that path would be xe2x80x9cMICROSxcx9c2xe2x80x9d, then xe2x80x9cMICROSxcx9c3xe2x80x9d, and so on. These short filenames are determined by the order in which their associated long filenames were created and cannot be set arbitrarily. This order-dependence is problematic when a system state change utility is used to create the factory-install package. A system state change utility works by capturing the changes an application makes to the system and then applying those changes back to another system to install the application.
Generally, each factory-install package is created independently, meaning that a Microsoft Internet Explorer package will be created on a system on which Microsoft Office is not already installed and vice-versa. This leaves open the possibility that, under a given path, the Microsoft Internet Explorer package could contain a xe2x80x9cMicrosoft Internet Explorerxe2x80x9d directory with the short filename of xe2x80x9cMICROSxcx9c1xe2x80x9d, and the Microsoft Office package could contain a xe2x80x9cMicrosoft Officexe2x80x9d directory with the same xe2x80x9cMICROSxcx9c1xe2x80x9d short filename. This in itself is not a problem because, when the packages are installed on the same system, the system will generate new short filenames for these long filename files and directories depending on the order in which they were created.
The problem is that some applications contain references in the registry or filesystem to short filenames. If a system state change utility is used to create a factory-install package of such an application, these references become static; that is, they point to the short filenames generated on the development system rather than to the short filenames generated dynamically during the factory-install. For a computer manufacturer that builds systems to order, Microsoft Office and Microsoft Internet Explorer can and are installed on a single system, but only one file or directory in a given path can truly be associated with the short name xe2x80x9cMICROSxcx9c1xe2x80x9d. This results in a situation where Microsoft Office has registry entries containing xe2x80x9cMICROSxcx9c1xe2x80x9d that inadvertently reference Microsoft Internet Explorer. This problem can arise any time similar long file or directory names are used within the same path. For example, the above-described problem will arise in connection with xe2x80x9cC: Program Files Norton AntiVirusxe2x80x9d and xe2x80x9cC: Program Files Norton Utilitiesxe2x80x9d as well.
There are currently several approaches used to address this problem. For example, in some cases, one application will create two (or more) similar long filename directories under a given path that cannot be modified using the aforementioned method. In this case, the application can be broken into multiple pieces that can be installed in the appropriate order to ensure the proper long filename/short filename associations.
Another solution involves replacing the short filename reference with the long filename. This is not always possible, however, and requires human intervention to attempt to determine what other modifications to the registry key need to be made. Yet another solution is to factory-install software to non-default directories when the default long filenames would cause problems. Microsoft Office is installed to xe2x80x9cMSOfficexe2x80x9d instead of xe2x80x9cMicrosoft Officexe2x80x9d. Some applications, such as Microsoft Internet Explorer, do not allow the installation directory to be changed, so there is no method currently to avoid this problem in those cases.
Therefore, what is needed is a method for factory-installing files and directories with long filenames while maintaining proper references to their short filename equivalents.
One embodiment, accordingly, provides a method and apparatus for factory-installing directories with long filenames while maintaining proper references to the short filename equivalents thereof. During a development stage, a determination is made whether any files or directories with long filenames were created by an application installed on a development system for developing an installation package for the application. If so, the development system is queried for the short filenames associated with these long filenames. The development system then creates a factory-install package for the application in which all short filename references to these long filename files and directories are programmatically replaced with tokens that are unique to each long filename.
A principal advantage of this embodiment is that it can be used in connection with applications, such as Microsoft Internet Explorer, that do not allow the installation directory to be changed. In addition, it works in cases in which the short filename reference cannot be replaced with the long filename and does not require human intervention to determine what other modifications to the registry key need to be made.